home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / X11 / config / sunLib.rules < prev    next >
Text File  |  2006-04-12  |  4KB  |  134 lines

  1. XCOMM $Xorg: sunLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
  2.  
  3. /*
  4.  * SunOS shared library rules
  5.  */
  6.  
  7. XCOMM $XFree86: xc/config/cf/sunLib.rules,v 1.3 2001/01/17 16:38:49 dawes Exp $
  8.  
  9. #ifndef HasSharedLibraries
  10. #define HasSharedLibraries YES
  11. #endif
  12. #ifndef SharedDataSeparation
  13. #define SharedDataSeparation YES
  14. #endif
  15. #ifndef SharedCodeDef
  16. #define SharedCodeDef -DSHAREDCODE
  17. #endif
  18. #ifndef SharedLibraryDef
  19. #define SharedLibraryDef -DSUNSHLIB
  20. #endif
  21. #ifndef ShLibIncludeFile
  22. #define ShLibIncludeFile <sunLib.tmpl>
  23. #endif
  24. #ifndef SharedLibraryLoadFlags
  25. #define SharedLibraryLoadFlags -assert pure-text
  26. #endif
  27. #ifndef PositionIndependentCFlags
  28. #if HasGcc2
  29. #define PositionIndependentCFlags -fPIC
  30. #else
  31. #define PositionIndependentCFlags -pic
  32. #endif
  33. #endif
  34. #ifndef PositionIndependentCplusplusFlags
  35. #if HasGcc2ForCplusplus
  36. #define PositionIndependentCplusplusFlags -fPIC
  37. #else
  38. #define PositionIndependentCplusplusFlags -pic
  39. #endif
  40. #endif
  41.  
  42. /*
  43.  * SharedDSLibDependencies - shared library dependencies with data separation
  44.  */
  45. #ifndef SharedDSLibDependencies
  46. #define SharedDSLibDependencies(libname,libsource,revname) _UseCat($(USRLIBDIR)/lib,libsource/lib,libname.sa.$(revname))
  47. #endif
  48.  
  49. /*
  50.  * InstallSharedLibrary - generate rules to install the shared library.
  51.  */
  52. #ifndef InstallSharedLibrary
  53. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  54. InstallTarget(install,Concat(lib,libname.so.rev),$(INSTLIBFLAGS),dest)
  55. #endif /* InstallSharedLibrary */
  56.  
  57. /*
  58.  * InstallSharedLibraryData - generate rules to install the shared library data
  59.  */
  60. #ifndef InstallSharedLibraryData
  61. #define    InstallSharedLibraryData(libname,rev,dest)            @@\
  62. install:: Concat(lib,libname.sa.rev)                    @@\
  63.     MakeDir($(DESTDIR)dest)                        @@\
  64.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\
  65.     RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev))
  66. #endif /* InstallSharedLibraryData */
  67.  
  68. #if HasPurify
  69. #define PureCleanSharedLibrary(libname,rev)                @@\
  70. clean clean.pure::                            @@\
  71.     $(RM) Concat3(lib,libname,_pure_*.so.rev)
  72. #else
  73. #define PureCleanSharedLibrary(libname,rev) /**/
  74. #endif
  75.  
  76. /*
  77.  * SharedLibraryTarget - generate rules to create a shared library;
  78.  * build it into a different name so that we do not hose people by having
  79.  * the library gone for long periods.
  80.  */
  81. #ifndef SharedLibraryTarget
  82. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  83. AllTarget(Concat(lib,libname.so.rev))                    @@\
  84.                                     @@\
  85. Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)            @@\
  86.     $(RM) $@~                            @@\
  87.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
  88.     $(RM) $@                             @@\
  89.     $(MV) $@~ $@                            @@\
  90.     LinkBuildLibrary($@)                        @@\
  91.                                     @@\
  92. clean::                                    @@\
  93.     $(RM) Concat(lib,libname.so.rev)                @@\
  94.                                     @@\
  95. PureCleanSharedLibrary(libname,rev)
  96. #endif /* SharedLibraryTarget */
  97.  
  98. /*
  99.  * SharedDepLibraryTarget - generate rules to create a shared library.
  100.  */
  101. #ifndef SharedDepLibraryTarget
  102. #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up)    @@\
  103. AllTarget(Concat(lib,libname.so.rev))                    @@\
  104.                                     @@\
  105. Concat(lib,libname.so.rev):  deplist $(EXTRALIBRARYDEPS)        @@\
  106.     $(RM) $@~                            @@\
  107.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
  108.     $(RM) $@                             @@\
  109.     $(MV) $@~ $@                            @@\
  110.     LinkBuildLibrary($@)                        @@\
  111.                                     @@\
  112. clean::                                    @@\
  113.     $(RM) Concat(lib,libname.so.rev)                @@\
  114.                                     @@\
  115. PureCleanSharedLibrary(libname,rev)
  116. #endif /* SharedDepLibraryTarget */
  117.  
  118. /*
  119.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  120.  */
  121. #ifndef SharedLibraryDataTarget
  122. #define SharedLibraryDataTarget(libname,rev,salist)            @@\
  123. AllTarget(Concat(lib,libname.sa.rev))                    @@\
  124.                                     @@\
  125. Concat(lib,libname.sa.rev):  salist                    @@\
  126.     $(RM) $@                            @@\
  127.     $(AR) $@ salist                            @@\
  128.     RanLibrary($@)                            @@\
  129.     LinkBuildLibrary($@)                        @@\
  130.                                     @@\
  131. clean::                                    @@\
  132.     $(RM) Concat(lib,libname.sa.rev)
  133. #endif /* SharedLibraryDataTarget */
  134.